home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / util / pgp / pgpamiga / source / pgp_todo.lha / diff.multi+ < prev    next >
Encoding:
Text File  |  1993-08-28  |  2.4 KB  |  66 lines

  1. *** pgp.c.orig    Sat Jul  3 01:22:36 1993
  2. --- pgp.c    Sat Aug 28 23:58:46 1993
  3. ***************
  4. *** 852,854 ****
  5.           if (!conventional_flag)
  6. !         {
  7.               if (!filter_mode && !quietmode)
  8. --- 852,854 ----
  9.           if (!conventional_flag)
  10. !         {    int plus = 0;
  11.               if (!filter_mode && !quietmode)
  12. ***************
  13. *** 855,862 ****
  14.                   fprintf(pgpout, PSTR("\n\nRecipients' public key(s) will be used to encrypt. "));
  15. !              if (recipient == NULL || *recipient == NULL || **recipient == '\0')
  16. !             {    /* no recipient specified on command line */
  17.                   fprintf(pgpout, PSTR("\nA user ID is required to select the recipient's public key. "));
  18. !                 fprintf(pgpout, PSTR("\nEnter the recipient's user ID: "));
  19.                   getstring( mcguffin, 255, TRUE );    /* echo keyboard */
  20. !                 if ((mcguffins = (char **) malloc (2 * sizeof(char *))) == NULL) {
  21.                       fprintf(stderr, PSTR("\n\007Out of memory.\n"));
  22. --- 855,869 ----
  23.                   fprintf(pgpout, PSTR("\n\nRecipients' public key(s) will be used to encrypt. "));
  24. !             /* find the last recipient - is it '+'?        */
  25. !             if (recipient != NULL && *recipient != NULL) {
  26. !                 char **index = recipient;
  27. !                 for( ; *index != NULL; *index++) {
  28. !                     if (**index=='+' && *(index+1)==NULL) plus++;
  29. !                 }
  30. !             }
  31. !              if (recipient == NULL || *recipient == NULL || **recipient == '\0' || plus)
  32. !             {    /* no recipient specified on command line or '+' is the last id */
  33.                   fprintf(pgpout, PSTR("\nA user ID is required to select the recipient's public key. "));
  34. !                 fprintf(pgpout, PSTR("\nEnter the recipient's user ID(s): "));
  35.                   getstring( mcguffin, 255, TRUE );    /* echo keyboard */
  36. !                 if ((mcguffins = (char **) malloc (100 * sizeof(char *))) == NULL) {
  37.                       fprintf(stderr, PSTR("\n\007Out of memory.\n"));
  38. ***************
  39. *** 864,867 ****
  40.                   }
  41. !                 mcguffins[0] = mcguffin;
  42. !                 mcguffins[1] = "";
  43.               }
  44. --- 871,891 ----
  45.                   }
  46. !                 {    int i = 0;   char *index = mcguffin;
  47. !                     if (plus) {
  48. !                         for ( ; recipient[i][0]!='+'; i++) {
  49. !                         mcguffins[i] = recipient[i];
  50. !                         }
  51. !                     }
  52. !                     for ( ; *index!='\0'; i++) {
  53. !                         while ( *index==' ' || *index=='\t') index++;
  54. !                         if (*index == '\"') {
  55. !                             mcguffins[i] = ++index;
  56. !                             while (*index!='\"' && *index!='\0') index++;
  57. !                         } else {
  58. !                             mcguffins[i] = index;
  59. !                             while ( *index!=' ' && *index!='\t' && *index!='\0') index++;
  60. !                         }
  61. !                         if (*index=='\0') break;
  62. !                         *index++ = '\0';
  63. !                     }
  64. !                 }
  65.               }
  66.